package pers.crayon.baseprogram.enums;

import lombok.Getter;
import lombok.ToString;

/**
 * 请求状态枚举
 *
 * @author roamay.com
 * @since 2021/4/13 0:07
 */
@Getter
@ToString
public enum RequestStatusEnum {

    SUCCESS(200, "OK"),
    ERROR(500, "Server Error"),
    NO_PERMISSION(401, "No Permission");

    /**
     * 业务信息描述
     */
    private String message;

    /**
     * 业务嘛
     */
    private Integer code;


    RequestStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
